package de.jmda.fx.node.behaviour;

import javafx.event.Event;
import javafx.scene.Node;

public abstract class AbstractNodeBehaviour<T extends Event>
		implements Behaviour<T>
{
	/**
	 * node that triggers the behaviour
	 */
	protected Node node;
	
	/**
	 * @param node that triggers the behaviour ({@link #node})
	 * @throws ExceptionInInitializerError
	 */
	public AbstractNodeBehaviour(Node node) throws ExceptionInInitializerError
  {
	  super();

		if (node == null)
		{
			throw new ExceptionInInitializerError(
					"node is null, initialisation of behaviour failed");
		}

		this.node = node;
  }
}